

<!DOCTYPE html>
<html>
  <head>
    <title>
      validate验证框架演示
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Page-Enter" content="revealTrans(duration=1, transition=2)" />
    <meta http-equiv="Page-Exit" content="revealTrans(duration=1, transition=2)" />
    <link type="text/css" rel="stylesheet" href="../js/validate/css/validate.css" />
    <script src="./jquery-1.6.4.js" language="javascript">
    </script>
    <script src="../js/validate/talent-validate-all.js" language="javascript">
    </script>
    <script src="./demo.js" language="javascript">
    </script>
    <script src="./jquery-1.6.4.js" language="javascript">
    </script>
    <link type="text/css" rel="stylesheet" href="../css/bootstrap.min.css" />
    
    <link type="text/css" rel="stylesheet" href="../Styles/SyntaxHighlighter.css" />
	<link type="text/css" rel="stylesheet" href="./demo.css" />
	<script src="../Scripts/shCore.js" type="text/javascript"></script>
	<script src="../Scripts/shBrushJScript.js" type="text/javascript"></script>
	<script src="../Scripts/shBrushJava.js" type="text/javascript"></script>

  </head>
  <body>
    <form name="form1" style='border: 1px solid #9BDF70; margin: 4px;' title="form1">
      form1:
      <br />
      字段1
      <input type="text" value="" name="d1" />
      字段2
      <input type="text" value="" name="d2" />
      <br />
      字段1
      <input type="text" value="" name="d1" />
      字段2
      <input type="text" value="" name="d2" />
    </form>

    <form name="form2" style='border: 1px solid #9BDF70; margin: 4px;' title="form2">
      form2:
      <br />
      字段1
      <input type="text" value="" name="d1" />
      字段2
      <input type="text" value="" name="d2" />
      <br />
      字段1
      <input type="text" value="" name="d1" />
      字段2
      <input type="text" value="" name="d2" />
    </form>

    <form name="form3" style='border: 1px solid #9BDF70; margin: 4px;' title="form3">
      form3:
      <br />
      数字1
      <input type="text" value="2" name="n1" />
      数字2
      <input type="text" value="3" name="n2" />
      <br />
      数字1
      <input type="text" value="2" name="n1" />
      数字2
      <input type="text" value="3" name="n2" />
    </form>

    <div style='border: 1px solid #9BDF70; margin: 4px;' title="不属于任何form">
      无form的字段:
      <br />
      数字1
      <input type="text" value="2" name="n1" />
      数字2
      <input type="text" value="3" name="n2" />
    </div>


    <input type="button" class='button' value="验证form1" onclick="alert(tt.validateForm('form1'))" />
    <input type="button" class='button' value="验证form2" onclick="tt.validateForm('form2')" />
    <input type="button" class='button' value="验证form3" onclick="tt.validateForm('form3')" />
    <input type="button" class='button' value="验证form2和form3" onclick="tt.validateForm('form2', 'form3')" />
    <input type="button" class='button' value="验证form1和form3" onclick="tt.validateForm('form1', 'form3')" />
    <input type="button" class='button' value="验证所有" onclick="tt.validate()" />
  </body>
  <script id="talent_script">
    var field2 = new tt.Field("字段2", "d2");
    var fieldn2 = new tt.Field("数字2", "n2");

    tt.vf.req.add("d1", "d2");

    new tt.CV().add("d1").set('v', '>', field2);
    new tt.CV().add("n1").set('n', '>', fieldn2);
  </script>
</html>
